import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import HomeContainer from '@/components/tabars/HomeContainer'
import GoodsListCon from '@/components/tabars/GoodsListContainer'
import ShopCarCon from '@/components/tabars/ShopCarContainer'
import MemberCon from '@/components/tabars/MemberContainer'
import GoodsInfo from '@/components/goods/GoodsInfo'
import Pinglun from '@/components/sbu-com/PingLun'
import GoodsDesc from '@/components/goods/GoodsDesc'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect:'/home'
    },
    {
      path: '/home',
      name: 'HomeContainer',
      component: HomeContainer
    },
    {
      path: '/goodslist',
      name: 'GoodsListCon',
      component: GoodsListCon
    },
    {
      path: '/shopcar',
      name: 'ShopCarCon',
      component: ShopCarCon
    },
    {
      path:'/member',
      name:'MemberCon',
      component:MemberCon
    },
    {
      path: '/goodsinfo/:id',
      name: 'GoodsInfo',
      component:GoodsInfo,
      props:true,
      children:[{
        path: 'goodsdesc',
        name:'goodsdesc',
        component:GoodsDesc,
        props:true
      },
      {
        path: 'goodspinglun',
        name:'goodspinglun',
        component:Pinglun,
        props:true
      }]
    }
  ],
  linkActiveClass: 'mui-active'
})
